package com.wt.controller.controller.index;

import com.wt.service.service.IndexService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController
{
    private final static Logger LOGGER = Logger.getLogger(IndexController.class);

    @Autowired
    private IndexService indexService;

    @RequestMapping("index")
    @ResponseBody
    public ModelAndView index(HttpServletRequest request)
    {
        //记录登录记录
        indexService.index(request);

        return new ModelAndView("/demo/login");
    }
}
